import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
import { CPAAS_IAM } from 'utils/config';
import request from 'utils/request';
export function getPasswordRule() {
  return _getPasswordRule.apply(this, arguments);
}

function _getPasswordRule() {
  _getPasswordRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
    var params,
        _args = arguments;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
            return _context.abrupt("return", request("".concat(CPAAS_IAM, "/v1/").concat(params.organizationId, "/password-policies/query"), {
              method: 'GET'
            }));

          case 2:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return _getPasswordRule.apply(this, arguments);
}